/*
 * P2PMessageSupplier.h
 *
 */

#ifndef P2PMESSAGESUPPLIER_H_
#define P2PMESSAGESUPPLIER_H_

class MP2PMessageSupplier
	{
public:
	/**
	 * Notifies message supplier that connection with a peer has been established.
	 */
	virtual void ConnectionEstablished() {};
	/**
	 * Notifies message supplier that connection with a peer has been lost.
	 */
	virtual void ConnectionLost() {};
	/**
	 * Message Supplier should return next payload for delivery to peer.
	 */
	virtual HBufC8* GetNextMessagePayload() = 0;
	/**
	 * A message has arrived from peer.
	 */
	virtual void MessageReceived(const TDesC8& aIncomingPayload) = 0;
	/**
	 * Informs Message Supplier of delivery status of message
	 */
	virtual void SendResult(TInt aError) {};
	};


#endif /* P2PMESSAGESUPPLIER_H_ */
